package tom_io_nio.bio;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class ReadFile {

    public static void main(String[] args){

        try{
            FileInputStream fileInputStream = new FileInputStream("/Users/mac/Desktop/test.txt");
            BufferedReader reader = new BufferedReader(new InputStreamReader(fileInputStream));

            System.out.println(reader.readLine());
            System.out.println(reader.readLine());
            System.out.println(reader.readLine());
            System.out.println(reader.readLine());
            System.out.println(reader.readLine());
            System.out.println(reader.readLine());

            fileInputStream.close();
            reader.close();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
